#include <inttypes.h>

typedef struct tagCaptureContext {
    char *inputFn;
    char *outputFn;
    uint8_t bmphead[54];
    uint8_t (*pict)[3];
    int pictMemSize;
    int width;
    int height;
    int lastInputNumber;
} CaptureContext;

int analyzePicture(CaptureContext *ctx, int *avgRow, int *avgCol);
int analyzePicture(int *avgRow, int *avgCol);
int loadPictureBlocking(CaptureContext *ctx);
int loadPictureBlocking();
int savePicture(CaptureContext *ctx);
int savePicture();
int camGetWidth(CaptureContext *ctx);
int camGetHeight(CaptureContext *ctx);
int camGetWidth();
int camGetHeight();

class WebcamAnalyzer {
    private:
        int ffmpegPid;
    public:
//        void 
};
